<template>
    <el-card class="lc-information">
        <div class="title-container">
            <span class="rect"></span>
            <h3>工商信息</h3>
        </div>
        <el-divider></el-divider>
        <div class="main">
            <div> 统一社会信用代码：{{ unifiedSocialCreditCode || "--" }}</div>
            <div class="right">注册资本：{{ info.RgeCapital || "--" }}万元</div>
            <div v-if="info.FoundedDate">成立日期：-</div>
            <div v-else>成立日期：{{ lr_dateFormat(info.FoundedDate, 'yyyy-MM-dd') || "--" }}</div>
            <div class="right">行业分类：{{ info.IndustyCode || "--" }}</div>
            <div>法定代表人：{{ info.PrincipalName || "--" }}</div>
            <div class="right">联系电话：{{ info.EntTel || "--" }}</div>
        </div>
        <div class="bottom">
            <div>行政处罚次数</div>
            <div>是否列入异常经营名录（2019-10）</div>
            <div>变更记录次数</div>
            <div>是否“守合同重信用”企业</div>
        </div>
    </el-card>
</template>


<script>
const wjApi = window.$api.enterpriseManagement.wjscms
export default {
    data() {
        return {
            info: {}
        }
    },
    props: {
        unifiedSocialCreditCode: {
            type: String,
            default: ""
        }
    },
    methods: {
        async init() {
            this.info = {};
            if (this.unifiedSocialCreditCode) {
                let res = await wjApi.info(
                    `http://221.224.136.227/wjscms/cf/service/DBService/QYXXXX`,
                    {
                        UID: this.unifiedSocialCreditCode,
                        f: "list"
                    }
                )
                this.info = res.Data[0]
            }
        }
    },
    mounted() {
        // this.init()
    }
}
</script>


<style scoped lang='scss'>
.main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 20px;
    grid-row-gap: 10px;

    div {
        font-size: 12px;
    }
}

.bottom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 5px;
    grid-row-gap: 10px;
    margin-top: 18px;

    div {
        font-size: 12px;
        height: 40px;
        padding: 0 2px 0 10px;
        background: #f9f9f9;
        line-height: 40px;
    }
}

.lc-information {
    width: 60.5%;

    .right {
        display: inline-block;
        margin-left: 100px;
    }
}

::v-deep .el-divider--horizontal {
    margin: 5px 0;
}
</style>